<?php 
// back page
include_once("../UserIncludes/DbConfig.php");
include_once("../UserIncludes/DataTables.php");

$str="";
if($_REQUEST['runn']=='N')
{
	$update_run_adcampaign="update adcampaign set runn = 'Y' where campaign_id = '".$_REQUEST['campaign_id']."'";
	$str .="Running".":".$_REQUEST['count_col'];
}
else
{
	$update_run_adcampaign="update adcampaign set runn = 'N' where campaign_id = '".$_REQUEST['campaign_id']."'";
	$str .="Paused".":".$_REQUEST['count_col'];
}
mysql_query($update_run_adcampaign);

$SQL_action = "select * from adcampaign where campaign_id = '".$_REQUEST['campaign_id']."'";
//echo $SQL_action;
$EXE_action=mysql_query($SQL_action);
$ROW_action=mysql_fetch_array($EXE_action);

$str .=":";
if($ROW_action['runn']=='N')
{
	$str .= '<img src="images/icon-status-running.gif" align="middle" onclick="change_status('.$_REQUEST['campaign_id'].',\''.$ROW_action['runn'].'\','.$_REQUEST['count_col'].');">';

}
else
{
	$str .= '<img src="images/icon-status-paused.gif" align="middle" onclick="change_status('.$_REQUEST['campaign_id'].',\''.$ROW_action['runn'].'\','.$_REQUEST['count_col'].');">';

}

echo $str."^6";
//echo "^6";
?>
